<script setup>
import {ref,defineEmits,reactive } from 'vue'
//子传父
const emit = defineEmits(['updates', 'updateForm'])
const getTop = () => {
    emit('updates',forms)
}
//收集输入的信息
const forms = reactive({
    id:new Date().getTime(),
    name:''
})

</script>
<template>
     <div class="appu" style="width: 100%;height: 100%;">
        <div class="topNav">
            <van-icon name="arrow-left" @click="getTop" />
            <span style="font-weight: bold;">笔记</span>
            <p class="shang">...</p>
        </div>
        <div class="xias">
           <textarea style="width: 100%;height: 100vh;border: 0;"
           v-model="forms.name"
           ></textarea>
        </div>
    </div>

</template>
<style scoped>
.shang{
    width: 30px;
    height: 20px;
    line-height: 10px;
    text-align: center;
}
.xias{
    padding: 0 10px 0 10px;
}
.topNav {
    display: flex;
    width: 100%;
    height: 50px;
    padding: 0 10px 0 10px;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
}
.appu {
    height: 100%;
    width: 100%;
    padding: 0 10px 0 10px;
    background-color: #fff;
    position: fixed;
    top: 0;
    right: 0;
    z-index: 2009;
}
</style>